﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace TCommon
{
    public partial class MessageBoard : UserControl
    {
        private static string currentMsg = "";
        private static Font font = new Font("SimSun", 16, FontStyle.Bold);
        private static SolidBrush brush = new SolidBrush(Color.FromArgb(255, 0, 133, 226));
        private static PointF point = new PointF(1f, 1f);

        public MessageBoard()
        {
            InitializeComponent();
            SetStyle(ControlStyles.SupportsTransparentBackColor
              | ControlStyles.UserPaint
              | ControlStyles.AllPaintingInWmPaint
              | ControlStyles.Opaque, true);
            this.BackColor = Color.Transparent;
        }

        public void ShowMsg(string msg)
        {
            currentMsg = msg;
            this.Refresh();
        }

        protected override CreateParams CreateParams
        {
            get
            {
                CreateParams cp = base.CreateParams;
                cp.ExStyle |= 0x20;
                return cp;
            }
        }

        protected override void OnPaintBackground(PaintEventArgs e)
        {
            base.OnPaintBackground(e);
        }
    }
}
